/**
 * NettySpringApplication
 * @author TracyHenry
 * date 2018/08/12
 */
package net.thxjj;


import net.thxjj.netty.NettyServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.openfeign.EnableFeignClients;
import javax.annotation.Resource;

@MapperScan("net.thxjj.service.dao")
@EnableFeignClients
@SpringBootApplication
public class NettySpringApplication extends SpringBootServletInitializer implements CommandLineRunner {

    @Resource
    private NettyServer nettyServer;

    public static void main(String[] args) {
        SpringApplication.run(NettySpringApplication.class, args);
    }

    @Override
    public void run(String... strings) throws Exception {
        nettyServer.run();
    }
}